package tech.xs.sys.domain.bo.dict;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import tech.xs.common.framework.domain.enums.DataSourceTypeEnum;
import tech.xs.sys.domain.entity.SysChildDict;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @author 沈家文
 * @since 2023/5/22$ 20:35$
 */
@Getter
@Setter
@ToString
public class ManualEditChildDictBo implements Serializable {

    protected Long id;

    @NotBlank
    private String code;

    private String name;

    private String dictCode;

    private DataSourceTypeEnum source;

    private String remark;

    public void checkParameter() {
        SysChildDict.checkCode(code, "code");
    }

}
